<!DOCTYPE html>
<html lang="en">
<head>
    <meta name="viewport" content="width=device-width,user-scalable=0"/>
    <meta charset="UTF-8">
    <title>投诉建议</title>
    <script src="__api__/js/fontSize.js"></script>
    <link rel="stylesheet" href="__api__/css/bootstrap.min.css">
    <link rel="stylesheet" href="__api__/css/reset.css">
    <link rel="stylesheet" href="__api__/css/my_main.css">
    <script src="__assets__/js/jquery.min.js"></script>
    <script src="__assets__/layui.js"></script>
    <style>
        body{
            background-color: #ebebeb;
        }
    </style>
</head>
<body>
<div class="advise">
    <div class="advise_box1">
        <div class="container">
        <form action="" onsubmit="return false">
          <div class="adv_radio">
              <h3>请选择反馈类型</h3>
              
              <div class="rad">
                  <div class="opt">
                      <input class="magic-radio" type="radio" name="type" id="r1" value="1" checked>
                      <label for="r1">产品建议</label>
                  </div>
                  <div class="opt">
                      <input class="magic-radio" type="radio" name="type" id="r2" value="2">
                      <label for="r2">服务需求</label>
                  </div>
                  <div class="opt">
                      <input class="magic-radio" type="radio" name="type" id="r3" value="3">
                      <label for="r3">用户体验</label>
                  </div>
              </div>
          </div>
            <div class="adv_text">
                <textarea placeholder="请输入您的反馈意见，我们将认真聆听" name="content"></textarea>
            </div>
        </div>
    </div>

    <div class="advise_box2">
        <div class="container">
            <p>您的联系方式（QQ号/邮箱/手机）</p>
            <div class="adv_contact">
                <input type="text" name="tel">
            </div>
        </div>
    </div>
    <div class="adv_btn">
        <div class="container">
            <button class="adv" id='sub2'>提交</button>
        </div>
 </form>
    </div>
   
</div>
<script type="text/javascript">



$(function(){
	var layer;
	layui.use('layer', function(){
		   layer = layui.layer;
		  
		  //layer.msg('hello');
		});   
  $('#sub2').click(function(){
	  //alert('ss');
	  var data=$('form').serialize();
	 var url="{:url('api/advice/index')}";
	 $.post(url,data,function(res){
		var obj=eval('(' +res +')');
		 if(obj.status==1){
			 layer.msg('投诉建议成功',{icon:6});
		 }else{
			 layer.msg('投诉建议失败',{icon:5});
		 }
	 });
  })
 
});






</script>
</body>
</html>